home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / var / lib / screen-profiles / logo < prev    next >
Encoding:
Text File  |  2009-04-08  |  2.0 KB  |  61 lines

  1. #!/bin/sh -e
  2. #
  3. #    logo: determine which logo to use
  4. #    Copyright (C) 2008 Canonical Ltd.
  5. #
  6. #    Authors: Dustin Kirkland <kirkland@canonical.com>
  7. #
  8. #    This program is free software: you can redistribute it and/or modify
  9. #    it under the terms of the GNU General Public License as published by
  10. #    the Free Software Foundation, version 3 of the License.
  11. #
  12. #    This program is distributed in the hope that it will be useful,
  13. #    but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. #    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. #    GNU General Public License for more details.
  16. #
  17. #    You should have received a copy of the GNU General Public License
  18. #    along with this program.  If not, see <http://www.gnu.org/licenses/>.
  19.  
  20. if [ -r "$HOME/.screen-profiles/logo" ]; then
  21.     # Allow users to define their own logo
  22.     cat "$HOME/.screen-profiles/logo"
  23. elif [ -r "$HOME/.screen-profiles/distro" ]; then
  24.     # Allow manual override of distro
  25.     distro=`cat "$HOME/.screen-profiles/distro"`
  26. elif which lsb_release >/dev/null; then
  27.     # If lsb_release is available, use it
  28.     distro=`lsb_release -s -a 2>/dev/null`
  29. elif [ -r "/etc/issue" ]; then
  30.     # Otherwise, grab part of /etc/issue
  31.     distro=`cat /etc/issue`
  32. else
  33.     # No idea!
  34.     distro="Unknown"
  35. fi
  36.  
  37. if echo "$distro" | grep -qsi "ubuntu"; then
  38.     printf "\005{=b kr}\\\\\005{= ky}o\005{=b kY}/"
  39. elif echo "$distro" | grep -qsi "arch"; then
  40.     printf "\005{=b wb} A "
  41. elif echo "$distro" | grep -qsi "centos"; then
  42.     printf "\005{= gw}*\005{= mw}*\005{= yw}*\005{= bw}*%{=b Wk}"
  43. elif echo "$distro" | grep -qsi "debian"; then
  44.     printf "\005{= wr} @ "
  45. elif echo "$distro" | grep -qsi "fedora"; then
  46.     printf "\005{=b bw} f "
  47. elif echo "$distro" | grep -qsi "gentoo"; then
  48.     printf "\005{=b cw} > "
  49. elif echo "$distro" | grep -qsi "mandriva"; then
  50.     printf "\005{=b kc} (\005{=b ky}* "
  51. elif echo "$distro" | grep -qsi "redhat"; then
  52.     printf "\005{= Rk} RH "
  53. elif echo "$distro" | grep -qsi "slackware"; then
  54.     printf "\005{=u Bk},S "
  55. elif echo "$distro" | grep -qsi "suse"; then
  56.     printf "\005{= Wg}SuSE"
  57. else
  58.     printf " ? "
  59. fi
  60. exit 0
  61.